import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

///自定义appabr
class DrawRightWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    AppBar appBar = AppBar(); //获取appbar高度
    //横向布局
    return DecoratedBox(

      decoration: BoxDecoration(
          shape: BoxShape.rectangle,
          color: Colors.white,
          // borderRadius: BorderRadius.only(topLeft:Radius.circular(20.0), bottomLeft:Radius.circular(20.0),bottomRight: Radius.circular(0.0),topRight:Radius.circular(0.0)),
          // borderRadius: BorderRadius.circular(8.0),
          boxShadow: [
            BoxShadow(
                color: Colors.black12,
                offset: Offset(0.0, 15.0), //阴影xy轴偏移量
                blurRadius: 15.0, //阴影模糊程度
                spreadRadius: 1.0 //阴影扩散程度
                )
          ]),
      child: Container(
        alignment: Alignment.center,
        // color: Colors.white,
        width: 200,
        height: MediaQuery.of(context).size.height,
        // height: MediaQuery.of(context).size.height-appBar.preferredSize.height,
        // height: 300,
        child: GestureDetector(
          onTap: (){
            //点击退出侧滑
            Navigator.of(context).pop();
          },
          child: Text("我是右侧栏",style: TextStyle(fontSize: 20,fontStyle:FontStyle.italic ,fontWeight:FontWeight.bold ),),
        ),
      ),
    );
  }
}
